<template>
  <div id="app">
    <div class="background-pic">
      <div class="pic">
        <img :src="ima" />
      </div>
      <span class="username">{{ username }}</span>
    </div>

    <div class="clu-opt">
      <div class="option">
        <ul>
          <li>
            <div @click="toPublish" class="publish">
              <span class="p1"></span>
              <span class="p3"> &emsp; &emsp; &ensp;我的发布</span
              ><span class="p2"></span>
            </div>
          </li>
          <li>
            <div @click="toMylove" class="collection">
              <span class="p1"></span>
              <span class="p3">&emsp; &emsp; &ensp;我的收藏</span>
              <span class="p2"></span>
            </div>
          </li>
          <li>
            <div @click="toAssign">
              <span class="p1"></span>
              <span class="p3">&emsp; &emsp; &ensp;反馈意见</span>
              <span class="p2"></span>
            </div>
          </li>
        </ul>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "",
  data() {
    return {
      ima: this.$store.state.yb_userhead,
      username: this.$store.state.yb_usernick,
    };
  },
  //在界面创建的时候自动执行的代码
  created() {},
  methods: {
    toAssign() {
      this.$router.push({
        path: "/assign",
      });
    },
    toPublish() {
      this.$router.push({
        path: "/myActivity",
      });
    },
    toMylove() {
      this.$router.push({
        path: "/myLove",
      });
    },
    toLogin() {
      localStorage.removeItem("token");
      this.$router.push({
        path: "/login",
      });
    },
  },
};
</script>
<style scoped>
span {
  font-family: "icomoon";
}
.username {
  position: relative;
  top: 70%;
  font-size: small;
}

img {
  height: 100%;
  width: 100%;
}
#app {
  background-color: rgb(236, 234, 240);
  position: relative;
}
.background-pic {
  position: relative;
  height: 40%;
  /* background:#a4c6b6; */
  background: url("~@/assets/pic.png") -10% -10%;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  text-align: center;
}
.pic {
  position: absolute;
  /* width: 30%; */
  width: 95px;
  height: 95px;
  background: teal;
  top: 30%;
  left: 50%;
  margin-left: -50px;
  border-radius: 50%;
  overflow: hidden;
  border: solid 3px white;
}

.a {
  width: 100px;
  height: 100px;
  background-color: rgb(68, 148, 31);
}
.ac {
  width: 20px;
  height: 20%;
  background-color: aqua;
}
.clu-opt {
  width: 100%;
  height: 60%;
  background: #f8f6f7;
}
ul {
  margin: 0;
  padding: 0;
  color: #979ca0;
}
li {
  list-style: none;
  line-height: 300%;
}

.publish {
  width: 100%;
  border-bottom: 1px solid #f2f2f2;
  /* background: skyblue; */
}
.collection {
  width: 100%;
  border-bottom: 1px solid #f2f2f2;
}
.toLogin {
  width: 100%;
}
.option {
  position: absolute;
  background: #ffffff;
  width: 96vw;
  /* height: 13vh; */
  border-radius: 8px;
  top: 43%;
  left: 2%;
}
.p2 {
  position: absolute;
  right: 4%;
  font-size: 120%;
}
.p1 {
  position: absolute;
  left: 6%;
}
.p3 {
  margin: 2%;
}
</style>
